const user = require("../model/user")

module.exports = function (req, res) {
    var obj = req.body;
    user.updateOne({ _id: obj._id }, obj).then(result => {
        if (result) {
            res.send({
                code: 1,
                message: "个人信息更新成功"
            })
        } else {
            res.send({
                code: 0,
                message: "服务器出错，信息更新失败"
            })
        }
    })
}